  /*today推荐*/
  Load()
     function Load(){
     	$.ajax({
            type: 'POST',
            url: 'http://192.168.199.114:8080/HJF/user/get_home.do',
            dataType: 'JSON',
            data:{user_id:"f77bda02743b427c8b305cae286d83e0"},
            success: function(data){
            	/*today推荐*/
            	$.each(data.daily_list, function(index) {
            	  var aLi=$("<li class='cont-top-content'></li>")
            	  var oImg=$('<img src="'+data.daily_list[index].video_img_url+'">')
            	  var oP=$('<p>'+data.daily_list[index].video_summary+'</p>')
            	  var oP2=$('<p>'+data.daily_list[index].video_label_name+" | "+data.daily_list[index].video_title+" / "+data.daily_list[index].video_time+'</p>')
            	   aLi.append(oImg)
            	   aLi.append(oP)
            	   aLi.append(oP2)
            	  $('.cont-top-today').append(aLi) 
            	  oImg.on('click',function(){
            	  	window.location.href="detail.html"
            	  	localStorage.setItem('video_id',data.daily_list[index].video_id)
            	  	localStorage.setItem('user_id','f77bda02743b427c8b305cae286d83e0')
            	  })
            	});
            	/*关注的频道*/
            	console.log(data.follow_list)
            	if(data.follow_list.length>0){
            		console.log(data.follow_list)
            		$('.cont-content-content').hide()
            		$.each(data.follow_list, function(index) {
            	  var aLi=$('<li class="common-bg">'+
										'<div class="cont-content-head clear">'+
											'<div class="cont-content-backg"><img src="'+data.follow_list[index].channel_head_img_url+'"/></div>'+
											'<div class="cont-douyu">'+
												'<div class="cont-douyu-tv">'+
													'<p>'+data.follow_list[index].channel_name+'</p>'+
										           '<i class="iconfont video-list">&#xe62d;</i>'+
												'</div>'+
												'<p class="cont-total-people">'+data.follow_list[index].channel_summary+'</p>'+
											'</div>'+
											'<div class="cont-content-foot">已关注</div>'+
										'</div>'+
										/*<div class="common-bg-style">
											<img src="../img/lol.jpg"/>
											<p>VP战队重回世界之巅全程回顾</p>
											<p>by Dotaer | DOTA2 /03'39"</p>
										</div>*/
									'</li>')
            	  var oUl=$('<div class="swiper-container"></div>')
            	  var wamp=$('<div class="swiper-wrapper" ></div>')
            	  var page=$('<div class="swiper-pagination"></div>')
            	  $.each(data.follow_list[index].video_list, function(i) {
            	  	var Li=$('<div  class="swiper-slide common-bg-style" style="width: 10.8rem;">'+
											'<img style="width: 10.8rem;"  src="'+data.follow_list[index].video_list[i].video_img_url+'"/>'+
											'<p>'+data.follow_list[index].video_list[i].video_title+'</p>'+
											'<p>'+data.follow_list[index].video_list[i].channel_name+' | '+data.follow_list[index].video_list[i].video_label_name+' / '+data.follow_list[index].video_list[i].video_time+'</p>'+
										'</div>')
            	  	 wamp.append(Li)
            	  oUl.append(wamp)
            	  oUl.append(page)
            	  Li.on('click',function(){
            	  	var num=$(this).index()
            	  	console.log(num)
            	  		window.location.href="detail.html"
            	  	localStorage.setItem('user_id','f77bda02743b427c8b305cae286d83e0')	
            	    localStorage.setItem('video_id',data.follow_list[index].video_list[num].video_id)
            	  })
            	  })
            	  aLi.append(oUl)
            	  $('.cont-content-focus').append(aLi) 
            	  /*跳转到频道视频列表*/
            	 $('.video-list').on('click',function(){
            	 	var _this=$(this).parent().parent().parent().parent().index()
            	 	console.log(_this)
            	 	localStorage.setItem('user_id','f77bda02743b427c8b305cae286d83e0')	
            	 localStorage.setItem('channel_id',data.daily_list[_this].channel_id)	
            	 window.location.href="alreadyfocus.html"
            	 })
            	});
            	}else{
            		$('.cont-content-content').show()
            	}
            	/* wonderful视频*/
            	console.log(data.wonderful_list)
        	
            	$.each(data.wonderful_list, function(index) {
            	  	var oDiv=$('<div class="swiper-slide wonderful-head"><img style="width: 10.8rem;" src="'+data.wonderful_list[index].channel_head_img_url+'"/><h2>'+data.wonderful_list[index].channel_name+'</h2><img class="wonderful-header" src="'+data.wonderful_list[index].channel_head_img_url+'"/></div>')
            	  	oDiv.on('click',function(){
            	  		window.location.href="detail.html"
            	  		localStorage.setItem('video_id',data.wonderful_list[index].video_data.video_id)
            	  		localStorage.setItem('user_id','f77bda02743b427c8b305cae286d83e0')
            	  	})
            	  $('.swiper-cont').append(oDiv)
            	});
            	console.log(data.game_list)
            	/*游戏分类*/
            	$.each(data.game_list, function(index) {
            	  var aLi=$("<li class='common-style-pic'></li>")
            	  var oImg=$('<img src="'+data.game_list[index].game_img_url+'">')
            	  var oP=$('<p>'+data.game_list[index].game_name+'</p>')
            	   aLi.append(oImg)
            	   aLi.append(oP)
            	  $('.cont-foot-game').append(aLi) 
            	  aLi.on('click',function(){
            	  	window.location.href="today.html"
            	  	console.log(data.game_list[index].game_id)
            	  	localStorage.setItem('game_id',data.game_list[index].game_id)
            	  	localStorage.setItem('user_id','f77bda02743b427c8b305cae286d83e0')
            	  })
            	});
            	
            	/*swiper*/
            	var swiper = new Swiper('.swiper-container', {
            		pagination: '.swiper-pagination'
				    });
            	console.log(data.game_list)
            },
            error: function(xhr, type){
            	layer.msg('系统繁忙');
            }
       });
         
     }
     
 
    






















